export interface categoryListType {
  category_id: string
  category_name: string
  category_order: number
  id: number
  parent_id: string
  children?: categoryListType[]
}

export interface categoryListQueryType {
  parent_id: string
}

export interface categorySaveType {
  parent_id: string
  category_name: string
  category_order: number
}

export interface categoryUpdateType extends categorySaveType{
  category_id: string
}



export const categoryColumns = (h) => [
  {
    title: "分类名称",
    align: 'center',
    key: "category_name"
  },
  {
    title: "排序",
    align: 'center',
    key: "category_order"
  },
  {
    title: "操作",
    align: 'center',
    key: "category_id",
    width: "200",
    render: (r:categoryListType) => h(r)
  },
]
